﻿@*YoursLC有源低代码 Create:admin 2022-09-23 19:26:35 弹出选择树-此文件放置于Views/Demo11/中*@

@using Think9.Models;
@{ ViewBag.Title = "多列选择数据预览 - 最多显示100条";
    Layout = "~/Areas/Shared/_LayuiForm.cshtml"; }

<input style="display:none" id="_id" value="@ViewBag.Id">

<table class="layui-hide" id="tableId" lay-filter="tableFilter"></table>

<script>
    layui.use(["table", "form", "exLayer", "exUtils"], function () {
        let table = layui.table;
        let form = layui.form;
        let exLayer = layui.exLayer;
        let exUtils = layui.exUtils;

        let $ = layui.$;

        form.render();

        let ThisTable = table.render({
            elem: "#tableId",
            url: "/SysTable/RuleLook/GetRuleMultipleDataList?id=" + $('#_id').val(),
            method: "POST",
            cols: [[
                { type: "numbers", title: "NO.", fixed: 'left' }
                , { field: "Value", title: "Value" }
                , { field: "info1", title: "..." }
                , { field: "info2", title: "..." }
                , { field: "info3", title: "..." }
                , { title: "...", width: 50, templet: "<span>...</span>" }
            ]],
            done: function (res, curr, count) {
                if (count == -1) {
                    $('th').hide();//表头隐藏的样式
                    $('tr').css({ 'background-color': '#BCD2EE', 'color': 'RED' });//设置th颜色
                    exLayer.redCryMsg("ERR");
                }
            }
        });
    });
</script>